| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

RelativeLayout.h
1 // RelativeLayout.h
3 //
5
6 namespace nkWinUi
7 {
11 class RelativeLayout final : public Layout
12 {
13 public :
14
20 RelativeLayout (System* system) noexcept ;
24 RelativeLayout (const RelativeLayout&) = delete ;
28 virtual ~RelativeLayout () ;
29
30 // Getters
35 Component* getComponentAt (unsigned int index) const ;
36
37 // Setters
41 virtual void setParentComponent (Component* parent) override ;
42
43 // Components
52 void addComponent (Component* component, const nkMaths::Rectangle& area) ;
61 void addComponent (Component* component, const nkMaths::Rectangle& area, RELATIVE_POSITION position, Component* relativeTo) ;
65 virtual void removeComponent (Component* component) override ;
66
67 // Update
71 virtual void update () override ;
72
73 // Import / Export
77 virtual void exportComponentsNodeEntry (nkExport::Node* rootNode) override ;
81 virtual void processComponentsNodeEntry (nkExport::Node* rootNode) override ;
82
83 // Operators
87 RelativeLayout& operator= (const RelativeLayout&) = delete ;
88 } ;
89 }
nkWinUi::RelativeLayout::addComponent
void addComponent(Component *component, const nkMaths::Rectangle &area, RELATIVE_POSITION position, Component *relativeTo)
nkWinUi::RelativeLayout::RelativeLayout
RelativeLayout(const RelativeLayout &)=delete
nkWinUi::Layout
Represents a layout to organize children of a component.
Definition: Layout.h:12
nkWinUi::RelativeLayout::setParentComponent
virtual void setParentComponent(Component *parent) override
nkWinUi::RelativeLayout::exportComponentsNodeEntry
virtual void exportComponentsNodeEntry(nkExport::Node *rootNode) override
nkWinUi::Component
Base class for any graphical component.
Definition: Component.h:12
nkWinUi::System
The main system of the component.
Definition: System.h:18
nkWinUi::RelativeLayout
Implements a layout positioning its children components relative to each other.
Definition: RelativeLayout.h:12
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkWinUi::RelativeLayout::~RelativeLayout
virtual ~RelativeLayout()
nkWinUi::RelativeLayout::RelativeLayout
RelativeLayout(System *system) noexcept
nkWinUi::RelativeLayout::removeComponent
virtual void removeComponent(Component *component) override
nkMaths::Rectangle
Represents a 2D rectangle.
Definition: Rectangle.h:12
nkWinUi::RelativeLayout::update
virtual void update() override
nkWinUi::RelativeLayout::getComponentAt
Component * getComponentAt(unsigned int index) const
nkWinUi
Encompasses all API of component NilkinsWinUi.
Definition: Clipboard.h:7
nkWinUi::RelativeLayout::operator=
RelativeLayout & operator=(const RelativeLayout &)=delete
nkWinUi::RELATIVE_POSITION
RELATIVE_POSITION
Possible relative positions of components.
Definition: RelativePosition.h:12
nkWinUi::RelativeLayout::processComponentsNodeEntry
virtual void processComponentsNodeEntry(nkExport::Node *rootNode) override
nkWinUi::RelativeLayout::addComponent
void addComponent(Component *component, const nkMaths::Rectangle &area)